<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>上传数据</title>
    <link rel="stylesheet" href="../css/element-ui/index.css">
    <link rel="stylesheet" href="upload.css">
</head>
<style>

</style>
<body>
<div id="app">

    <el-container style="height: 100%;">
        <el-header style="background-color: #0F69DE;">
            <el-row>
                <el-col :span="5" >
                    <h3 style="color: #ffffff">疫情监控数据上传</h3>
                </el-col>
                <el-col :span="19" style="padding-top: 15px">
                    <el-button style="z-index: 1; position: absolute;right: 0;" size="mini" @click="downloadTemplate">下载模板</el-button>
                </el-col>
            </el-row>
        </el-header>
<!--        <el-main>
            <el-row style="height: 100%">
                <el-col :span="18" style="height: 100%">
                    <el-container style="height: 100%;">-->
                        <el-main style="display:flex; align-items: center;justify-content: center;transform: translateY(-12%);flex-direction: column">
                            <el-row style="display: flex;margin-left: 20px;">
                                <el-col>
                                    <el-upload
                                            class="upload-demo"
                                            ref="upload"
                                            :action="actionUrl"
                                            :on-preview="handlePreview"
                                            :on-remove="handleRemove"
                                            :file-list="fileList"
                                            :on-success="uploadSuccess"
                                            :on-error="uploadError"
                                            :before-upload="beforeUpload"
                                            :auto-upload="false">
                                        <el-button slot="trigger" size="small" type="primary" @click="clearFile" class="custom-button">选取文件</el-button>
                                        <el-button style="margin-left: 24px;" size="small" type="success" @click="submitUpload" class="custom-button">导入数据</el-button>
                                        <el-checkbox  style="margin-left: 4px;" v-model="isUpdate">更新模式</el-checkbox>
                                        <span class="el-checkbox__label" v-if="isUpdate==true">主键是excel的前</span>
                                           <el-input v-model="configForm.updateColumnIndex" v-if="isUpdate==true" style="width: 50px;height: 30px"></el-input>
                                        <span v-if="isUpdate==true" class="el-checkbox__label">列</span>
                                        <div slot="tip" class="el-upload__tip">只能上传xls/xlsx文件</div>
                                    </el-upload>
                                </el-col>
                            </el-row>
                            <el-row class="error-msg">
                                {{errorMsg}}
                            </el-row>
                        </el-main>
<!--                    </el-container>
                </el-col>
            </el-row>

        </el-main>-->

    </el-container>
</div>
</body>
<script src="../js/vue/vue.js"></script>
<script src="../js/element-ui/index.js"></script>
<script src="../js/jquery/jquery.min.js?v=2.1.4"></script>
<script src="upload.js"></script>
</html>